import service from "@/util/request";

// 首页文章
export const getIndexArticle = (data) => {
  return service({
    url: "/home/articleList",
    method: "get",
    params: data,
  });
};

// 首页名人
export const getIndexCelebrity = (data) => {
  return service({
    url: "/home/celebrityList",
    method: "get",
    params: data,
  });
};

// 功德榜
export const getMeritRankingList = (data) => {
  return service({
    url: "/home/donateList",
    method: "get",
    params: data,
  });
};

// 名人列表
export const getCelebrityList = (data) => {
  return service({
    url: "/celebrity/pageList",
    method: "get",
    params: data,
  });
};

// 名人详情
export const getCelebrityDetail = (data) => {
  return service({
    url: "/celebrity/info",
    method: "get",
    params: data,
  });
};

// 通用列表
export const getList = (data) => {
  return service({
    url: "/article/articleList",
    method: "get",
    params: data,
  });
};

// 通用详情
export const getListDetail = (data) => {
  return service({
    url: "/article/info",
    method: "get",
    params: data,
  });
};

// 祠堂列表
export const getAncestralHall = (data) => {
  return service({
    url: "/ancestral/ancestralList",
    method: "get",
    params: data,
  });
};

// 堂号查询
export const getHallNumberList = (data) => {
  return service({
    url: "/ancestral/tangHaoList",
    method: "get",
    params: data,
  });
};

// 排位查询
export const getRankedList = (data) => {
  return service({
    url: "/ancestral/tabletList",
    method: "get",
    params: data,
  });
};

// 商品列表
export const getProductList = (data) => {
  return service({
    url: "/ancestral/goodsList",
    method: "get",
    params: data,
  });
};

// 商品分类列表
export const getProductCateList = (data) => {
  return service({
    url: "/ancestral/typeList",
    method: "get",
    params: data,
  });
};

// 添加订单
export const createOrder = (data) => {
  return service({
    url: "/ancestral/addOrder",
    method: "post",
    data: data,
  });
};

// 请求订单
export const requestOrder = (data) => {
  return service({
    url: "/ancestral/requestOrder",
    method: "get",
    params: data,
  });
};

// 捐赠
export const donation = (data) => {
  return service({
    url: "/ancestral/addDonate",
    method: "post",
    data: data,
  });
};

// 注册
export const postRegister = (data) => {
  return service({
    url: "/mini/register",
    method: "post",
    data: data,
  });
};

// 登录
export const postLogin = (data) => {
  return service({
    url: "/mini/smsLogin",
    method: "post",
    data: data,
  });
};

// banner列表
export const getBannerList = () => {
  return service({
    url: "/other/bannerList",
    method: "get",
  });
};

// 根据姓名编号查询
export const nameNumberQuery = (data) => {
  return service({
    url: "/home/familyList",
    method: "get",
    params: data,
  });
};

// 认亲查询
export const rqQuery = (data) => {
  return service({
    url: "/home/familyRecognizeRelatives",
    method: "get",
    params: data,
  });
};

// 族谱查询
export const zpQuery = (data) => {
  return service({
    url: "/home/familyTree",
    method: "get",
    params: data,
  });
};

// 普书查询
export const psQuery = (data) => {
  return service({
    url: "/home/familyPageList",
    method: "get",
    params: data,
  });
};

// 查询信息
// export const infoQuery = (data) => {
//   return service({
//     url: "/home/familyPageList",
//     method: "get",
//     params: data,
//   });
// };
